package com.park.service.impl.moments;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.park.client.model.moments.MomentsModel;
import com.park.client.service.moments.MomentsService;
import com.park.dao.moments.MomentsMapper;
import com.park.service.impl.base.BaseServiceImpl;

@Service("momentsService")
public class MomentsServiceImpl extends BaseServiceImpl<MomentsModel> implements MomentsService {
	
	@Autowired
	private  MomentsMapper  momentsMapper;

	@Override
	public boolean insert( MomentsModel moments) {
		return momentsMapper.insert(moments)==1 ;
	}
	@Override
	public List<MomentsModel> list(Long userId) {
		return momentsMapper.list(userId);
	}
	@Override
	public boolean deleteByPrimaryKey(Long id) {
		return momentsMapper.deleteByPrimaryKey(id)==1;
	}
	@Override
	public boolean insertSelective(MomentsModel record) {
		return momentsMapper.insertSelective(record)==1;
	}
	@Override
	public MomentsModel selectByPrimaryKey(Long id) {
		return momentsMapper.selectByPrimaryKey(id);
	}
	@Override
	public boolean updateByPrimaryKeySelective(MomentsModel record) {
		return momentsMapper.updateByPrimaryKeySelective(record)==1;
	}
	@Override
	public boolean updateByPrimaryKey(MomentsModel record) {
		return momentsMapper.updateByPrimaryKey(record)==1;
	}
	@Override
	public List<MomentsModel> selectByLimit() {
		return momentsMapper.selectByLimit();
	}
	@Override
	public List<MomentsModel> selectAll() {
		return momentsMapper.selectAll();
	}
	@Override
	public List<MomentsModel> selectByUserId(Map<String, Object> map) {
		return momentsMapper.selectByUserId(map);
	}
	@Override
	public List<MomentsModel> selectPagination(MomentsModel t) {
		return momentsMapper.selectPagination(t);
	}
	@Override
	public Integer selectTotal(MomentsModel t) {
		return momentsMapper.selectTotal(t);
	}
	

}
